﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Newbe.TestDirector.Notification.Web.Admin.Mails.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ef:EntityDataSource runat="server"
        ID="EfDataSource"
        ContextTypeName="Newbe.TestDirector.Notification.Web.Entities.DContext"
        EntitySetName="MailerInfos"
        EnableUpdate="True"
        EnableDelete="True"
        EnableInsert="True" OrderBy="it.Name">
    </ef:EntityDataSource>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" DataSourceID="EfDataSource">
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="MailAddress" HeaderText="MailAddress" SortExpression="MailAddress" />
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
        </Columns>
    </asp:GridView>

    <asp:FormView ID="FormView1" runat="server" DataSourceID="EfDataSource" DefaultMode="Insert" OnItemInserting="FormView1_ItemInserting" OnItemInserted="FormView1_ItemInserted">
        <EditItemTemplate>
            <br />
            Name:


            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            MailAddress:


            <asp:TextBox ID="MailAddressTextBox" runat="server" Text='<%# Bind("MailAddress") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="更新" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" />
        </EditItemTemplate>
        <InsertItemTemplate>
            Name:


            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            MailAddress:


            <asp:TextBox ID="MailAddressTextBox" runat="server" Text='<%# Bind("MailAddress") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="插入" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" />
        </InsertItemTemplate>
        <ItemTemplate>
            Id:


            <asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>' />
            <br />
            Name:


            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            MailAddress:


            <asp:Label ID="MailAddressLabel" runat="server" Text='<%# Bind("MailAddress") %>' />
            <br />

        </ItemTemplate>
    </asp:FormView>
</asp:Content>
